package com.gt.quality.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 系统访问记录(SysLogininfor)表实体类
 *
 * @author makejava
 * @since 2025-10-21 10:12:04
 */
@Data
@Schema(title = "SysLogininfor", description = "EasyCode")
@TableName(value = "sys_logininfor", autoResultMap = true)
public class SysLogininfor implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;


    /**
     * Description:  访问ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(title = "id", description = "访问ID")
    private Long id;


    /**
     * Description:  用户账号
     */
    @TableField(value = "user_name")
    @Schema(title = "user_name", description = "用户账号")
    private String userName;


    /**
     * Description:  客户端
     */
    @TableField(value = "client_key")
    @Schema(title = "client_key", description = "客户端")
    private String clientKey;


    /**
     * Description:  设备类型
     */
    @TableField(value = "device_type")
    @Schema(title = "device_type", description = "设备类型")
    private String deviceType;


    /**
     * Description:  登录IP地址
     */
    @TableField(value = "ipaddr")
    @Schema(title = "ipaddr", description = "登录IP地址")
    private String ipaddr;


    /**
     * Description:  登录地点
     */
    @TableField(value = "login_location")
    @Schema(title = "login_location", description = "登录地点")
    private String loginLocation;


    /**
     * Description:  浏览器类型
     */
    @TableField(value = "browser")
    @Schema(title = "browser", description = "浏览器类型")
    private String browser;


    /**
     * Description:  操作系统
     */
    @TableField(value = "os")
    @Schema(title = "os", description = "操作系统")
    private String os;


    /**
     * Description:  登录状态（0成功 1失败）
     */
    @TableField(value = "status")
    @Schema(title = "status", description = "登录状态（0成功 1失败）")
    private String status;


    /**
     * Description:  提示消息
     */
    @TableField(value = "msg")
    @Schema(title = "msg", description = "提示消息")
    private String msg;


    /**
     * Description:  访问时间
     */
    @TableField(value = "login_time")
    @Schema(title = "login_time", description = "访问时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime loginTime;

}


